home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / bbs / maxut11.zip / FILLST00.MEX < prev    next >
Text File  |  1996-06-23  |  17KB  |  490 lines

  1. //////////////////////////////////////////////////////////////////////////////
  2. // File: arealist.mex
  3. // Desc: Program to display a list of message or file areas.  If the
  4. //       MSGAREA constant is defined, this will display a list of
  5. //       message areas.  If FILEAREA is defined, this will display
  6. //       a list of file areas.
  7. // Copyright 1990, 1995 by Lanius Corporation.  All rights reserved.
  8. // $Id: arealist.mex 1.6 1995/07/27 17:48:05 sjd Exp $
  9. //
  10. // free for non-commerical use
  11. // Copyright 1995 1996 by Gerry Ellison.  All rights reserved.
  12. // File: changed to make fillst00.mex
  13. // Desc. Makes file list and tic list.
  14. // $Id: fillst00.mex 0.0 1995/12/24 24:00:00 gre Exp $
  15. // fillst00_CON to show on console also.
  16. //////////////////////////////////////////////////////////////////////////////
  17.  
  18. #include <max.mh>
  19.  
  20. #define FILEAREA
  21.  
  22. #ifdef FILEAREA
  23. #define ATYPE "file"
  24. #define AREAT _farea
  25. #define ARVAR farea
  26. #define AreaFindFirst fileareafindfirst
  27. #define AreaFindNext  fileareafindnext
  28. #define AreaFindClose fileareafindclose
  29. #define AreaSelect    fileareaselect
  30. #endif
  31.  
  32. #ifdef MSGAREA
  33. #define ATYPE "msg"
  34. #define AREAT _marea
  35. #define ARVAR marea
  36. #define AreaFindFirst msgareafindfirst
  37. #define AreaFindNext  msgareafindnext
  38. #define AreaFindClose msgareafindclose
  39. #define AreaSelect    msgareaselect
  40. #endif
  41.  
  42. int isourdivision(string: divstr, string: areaname)
  43. {
  44.   int:  i,l;
  45.   string: sub;
  46.  
  47.   l:=strlen(divstr);
  48.   sub:=substr(areaname,1,l);
  49.   if (strupper(sub)<>strupper(divstr))
  50.     return False;
  51.   sub:=substr(areaname,l+2,strlen(areaname)-l-1);
  52.   if (stridx(sub,1,'.'))
  53.     return False;
  54.   return True;
  55. }
  56.  
  57. int main(string: argv)
  58. {
  59.      int: i, done, levels, first, divonly,
  60.           fd,cn;
  61.   string: aname,division,tmp,path_file;
  62.   string: B,CD,CF,CFN,D,DDS,DV,E,G,GN,H,I,IM,L,LB,LX,M,MX,O,R,RP,
  63.           SDN,SDS,GR,WM,LS,RA,RD,RH,RL,RS,S,UN,W,WN,WT,z,ZX,line;
  64.     char: nonstop,
  65.           len,ch;
  66.  
  67. //  int filecopy(string: old, string: new);
  68.   struct AREAT: a;
  69.  
  70.     first:= True;
  71.   divonly:= False;
  72.  
  73.       GR := "\x16\x01\x07";
  74.       WM := "\x16\x01\x5F";
  75.       LS := WM+"░░░▒▒▒▓▓▓████";
  76.       RS := "████▓▓▓▒▒▒░░░"+GR;
  77.  
  78.     E := LS+"        New Files List etc.        "+RS;
  79.     B := LS+"    Maximus and other BBS Files    "+RS;
  80.     CD:= LS+"        CD-ROM Night Owl 12        "+RS;
  81.     CF:= LS+" FDN: CF - Crafting File Distr. Net"+RS;
  82.    CFN:= LS+" FDN: CFN - The Crafting File Net  "+RS;
  83.     D := LS+"  ADANet for the Handicapped Net   "+RS;
  84.     G := LS+" GSDS - Genealogy Distribution Net "+RS;
  85.     GN:= LS+"FDN: GAME_NET - Games File Distrib "+RS;
  86.     H := LS+" National Hamfile Distribution Net "+RS;
  87.     I := LS+"      IGA_Net<tm>  File Areas.     "+RS;
  88.    IM := LS+"FDN: IM InterMail & InterEcho Dist "+RS;
  89.     L := LS+" Programing Languages & Batch Aids "+RS;
  90.     LX:= LS+" FDN: LUX - THR's Linux File Dist. "+RS;
  91.     LB:= LS+"FDN: BFDS - Batch File Distribution"+RS;
  92.     M := LS+"       Modem and Comm. Areas       "+RS;
  93.     MX:= LS+"      FDN: MAX - Maximus FDN       "+RS;
  94.     DV:= LS+"          FDN: DVN - DVNet         "+RS;
  95.     O := LS+"           OS2 File Areas          "+RS;
  96.     R := LS+"   Rest of File Areas not listed   "+RS;
  97.    SDN:= LS+"    FDN: SDN International(sm)     "+RS;
  98.    SDS:= LS+"FDN: SDS - Software Distrib. System"+RS;
  99.     RA:= LS+"        FDN: Author-Direct         "+RS;
  100.    DDS:= LS+" FDN: DDS - DoorWare Distribution  "+RS;
  101.     RH:= LS+"       FDN: HOME - Home FDN        "+RS;
  102.     RL:= LS+"            LOCAL Areas            "+RS;
  103.     RP:= LS+"    FDN: RIP - Rip File Network    "+RS;
  104.     UN:= LS+"       FDN: UTILNET - UtilNet      "+RS;
  105.     ZX:= LS+"        FDN: ZYX - ZyxelNet        "+RS;
  106.     W := LS+"       Windows related files       "+RS;
  107.     WN:= LS+"         FDN: WIN - WinNet         "+RS;
  108.     WT:= LS+"      FDN: NT - Windows NT Net     "+RS;
  109.     S := LS+"            SysOp Only             "+RS;
  110.  
  111. print(COL_YELLOW+"\nConstructing File List and Tic-S.cfg with FileSpec "+
  112.       "and Announce for Seal."+GR);
  113.  
  114.       if (argv <> "CON") {
  115.           ch := input_list("yn", 0, "", "",
  116.           "\nDo you want to print to con");
  117.           if (ch = 89)
  118.               argv := "CON";
  119.        }
  120.  
  121.   fd := open("C:\\Max\\Miscx\\F_Alst03.bbs", IOPEN_CREATE | IOPEN_WRITE);
  122.     close(fd);
  123.   fd := open("C:\\Bbs\\Squish\\Tic-S.bse", IOPEN_CREATE | IOPEN_WRITE);
  124.     writeln(fd,"Net 108");
  125.     writeln(fd,"Node 107");
  126.     writeln(fd,"AKA 440:130/107");
  127.     writeln(fd,"SET TZ=EST5EDT");
  128.     writeln(fd,"IN C:\\Binkley\\Inbound\\");
  129.     writeln(fd,"ZONE 1 E:\\Msg\\Outbound\\");
  130. //    :: HOLD C:\Bbs\Tick\Hold\
  131. //    :: QDIR C:\Bbs\Tick\Qdir\
  132.     writeln(fd,"MAIL E:\\Msg\\Netmail\\");
  133. //    ; [ListFmt %3:-13 %1]       (Alters the default format of the FILES.BBS)
  134. //    ; [ListName Files.Bbs]      (Alters default name / location ofFILES.BBS)
  135. //    ;[AKA 1:1/313]             (Adds your AKA addresses to the [AKA 5:678/90]
  136. //    ;STOPDUP C:\Bbs\Tick\Hold\
  137.     writeln(fd,"STOPDUP C:\\Binkley\\Inbound\\");
  138.     writeln(fd,"QUIET");
  139. //   ;  The brackets indicate optional items, and should NOT be entered in the
  140. //   ;  real configuration file.
  141. //   ; [TEMP c:\ramdisk]      (Optional directory for temporary files)
  142. //   ; [FIDO]                 (Send files as MSG attaches instead of FLO attaches)
  143. //   ; [MAIL c:\netmail]      (Location of Netmail - Required if FIDO specified)
  144. // FLEA
  145. //  (If present, tells the program to also process inbound FLE files)
  146. // [LOGPATH]              (If present, log the PATH lines to the logfile)
  147. // [LOGSEEN]              (If present, log SEENBY lines to the logfile)
  148. // [CRC]                  (Enable CRC testing)
  149. // [LogCRC]               (Place copy of CRC in the log)
  150. // [Crc2Dup]              (Place copy of CRC in the DUP file, Necessary for DupByCRC)
  151. // [DupByCRC]             (Dupe file by CRC.  See [LOCAL DupByCRC] below for more information.)
  152.    writeln(fd,"NoWait");
  153. //      (Prevent *HATCH's from hanging a batch file on  errors or ommissions)
  154. // [Local]  Specifies the next argument is to be processed for only this area)
  155. // [DupByCRC] (Dupe file by CRC.  See [LOCAL DupByCRC] below for more information.)
  156. // [MailerKills] (Defines how TICK will generate FLO attach files, with
  157. // respect to the deletion of the TIC files. See below for more information.)
  158. // [RAID] (Allows creation of .RAD file for certain utilities such as RAID to
  159. // generate announcments of locally hatched files.)
  160.     writeln(fd,"REPLACE");
  161. //  (Allows the replacing of files, optionally on an area-by-area basis. See below for more infomation.)
  162. // [FDLog] (Forces TICK to log all activities in FrontDoors logfile format.)
  163. // [LOCAL BigDesc] (Allows large file descriptions See below for more information.)
  164. // [ForceINTL] (An INTL Kludge will be inserted for a MSG attach even if it's the same zone)
  165.  
  166.     writeln(fd,"");
  167.     writeln(fd,"   ------------------------------- AREAS -----------------------------------");
  168.     close(fd);
  169.  
  170.   fd := open("C:\\Bbs\\Squish\\Tic-s.spc", IOPEN_CREATE | IOPEN_WRITE);
  171.     close(fd);
  172.   fd := open("C:\\Bbs\\Squish\\Tic-s.ann", IOPEN_CREATE | IOPEN_WRITE);
  173.     close(fd);
  174.   // Set initial division name
  175.  
  176.   i:=strridx(ARVAR.name,0,'.');
  177.   if (i>0)
  178.     division:=substr(ARVAR.name,1,i-1);
  179.   else
  180.     division:="";
  181.  
  182.   do
  183.   {
  184.     int: len;
  185.  
  186.     len := input_str(aname, INPUT_WORD|INPUT_NOCTRLC|INPUT_DEFAULT,
  187.                            0, 64, COL_WHITE "\nSelect " ATYPE " area: ");
  188.  
  189.     print('\n');
  190.  
  191.     if (len=0)
  192.     {
  193.       if (first<>True)
  194.         return 0;
  195.       aname:="?";
  196.     }
  197.  
  198.     if (aname="..")
  199.     {
  200.       i:=stridx(division,1,'.');
  201.       if (i>0)
  202.         division:=substr(division,1,i-1);
  203.       else
  204.         division:="";
  205.       aname:="?";
  206.     }
  207.  
  208.     if (aname[1]='/')         // Top level list requested
  209.     {
  210.       aname:=substr(aname,2,strlen(aname)-1);
  211.       // List all top level areas
  212.       division:="";
  213.       if (aname[1]=' ')
  214.         aname:="?";
  215.     }
  216.  
  217.     first:=False;
  218.     divonly:=False;
  219.     if (aname[1]='?')         // Area list request